<!-- 兰文杰 2020-05-26 10:23:01.279 -->
<%@ page language="java" contentType="text/html; charset=UTF-8"
	isErrorPage="true" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" value="兰文杰">
<%@include file="/WEB-INF/pages/include/css-resource.jsp"%>
<title>错误信息</title>
<style type="text/css">
body {
	background-color: #87CEFA;
}

.error-container {
	width: 80%;
	margin: 0 auto;
	color: #ffffff;
}
</style>
</head>
<body>
	<div class="error-container text-center">
		<br /> <br />
		<h1>系统出错了，......</h1>
		<div class="text-center">
			<h2>
				系统将在&nbsp;<span id="time" style="color: red;">10</span>&nbsp;秒后自动跳转到${pageName}！
			</h2>
			<br /> <a class="btn btn-outline-primary btn-lg "
				href="${pageContext.request.contextPath}/${page}"><i
				class="fas fa-reply"></i>&nbsp;返回${pageName}</a>&nbsp;&nbsp; <a
				class="btn btn-outline-danger btn-lg " data-toggle="collapse"
				href="#errorMessage"><i class="fas fa-ghost"></i>&nbsp;显示错误详情</a>
		</div>
		<br />
		<div class="collapse overflow-auto" id="errorMessage">
			<div class="card card-body text-danger text-left">
				<p class="<%=exception == null ? "d-none" : "d-block"%>"><%=exception == null ? "" : exception.getMessage()%></p>
				<%
					if (exception != null) {
						StackTraceElement[] trace = exception.getStackTrace();
						for (int i = 0; i < trace.length; i++) {
							out.println(trace[i]);
						}
					}
				%>
			</div>
		</div>
	</div>
	<%@include file="/WEB-INF/pages/include/js-resource.jsp"%>
	<script type="text/javascript">
		var time = 10;
		setInterval(
				function() {
					time--;
					$("#time").text(time);
					if (time === 0) {
						window.location.href = "${pageContext.request.contextPath}/${page}";
					}
				}, 1000);
	</script>
</body>
</html>